# -*- codeing = utf-8 -*-
# @Time : 2024/3/28 17:45
# @Author : huangjing
# @File : demo.py
# @Software : PyCharm
import queue

def duilie():
    q = queue.Queue()
    q.put(1)
    q.put(2)
    q.put(3)
    print(q.get())
    print(q.get())
    print(q.get())

def duizhan():
    stack = []
    stack2 = []
    stack.append(1)
    stack.append(2)
    stack.append(3)
    stack2.append(stack.pop())
    stack2.append(stack.pop())
    stack2.append(stack.pop())
    print(stack2.pop())
    print(stack2.pop())
    print(stack2.pop())
if __name__ == '__main__':
    duilie()
    duizhan()